package cn.itcast.day04;

public class Demo4 {
    public static void main(String[] args) {
        A a = new A();
        a.method(new InterA() {
            @Override
            public void showA() {
                System.out.println("第一种方法调用");
            }
        });
        a.method(()->{
            System.out.println("第二种方法调用");
        });
    }

}
interface InterA{
    void  showA();
}
class A {
    public void method(InterA a ){
        a.showA();
    }
}
